<template>
  <div>
    <div class="row">
      <div style="flex-shrink: 0;font-size: 14px;">序号：</div><el-input size="mini" style="width: 60px;margin-right: 20px;" v-model="nodeModel.sort"></el-input>
      <div style="flex-shrink: 0;font-size: 14px;">是否显示：</div><el-switch v-model="nodeModel.isShow" :active-value="true" :inactive-value="false" active-color="#13ce66" inactive-color="#999999"></el-switch>
      <div style="margin-left: 20px;">
            <el-button @click="selectTemplate" size="mini">选用模版</el-button>
          </div>
    </div>
    <div class="row">
        <div style="flex-shrink: 0;font-size: 14px;">背景色：</div>
        <el-input size="mini" style="width: 100px;"  v-model="nodeModel.configDict.componentStyle.background"></el-input>
        <el-color-picker v-model="nodeModel.configDict.componentStyle.background"></el-color-picker>
    </div>
    <div class="column">
      <jcSlider title="组件宽：" :titleWidth="80"><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.width"
        :min="10" :max="750" show-input input-size="mini"></el-slider></jcSlider>
        <jcSlider title="上外边距："><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.marginTop" :min="0" :max="750" show-input input-size="mini"></el-slider></jcSlider>
        <jcSlider title="下外边距："><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.marginBottom" :min="0" :max="750" show-input input-size="mini"></el-slider></jcSlider>
        <jcSlider title="左外边距："><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.marginLeft" :min="0" :max="750" show-input input-size="mini"></el-slider></jcSlider>
        <jcSlider title="右外边距："><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.marginRight" :min="0" :max="750" show-input input-size="mini"></el-slider></jcSlider>
    </div>
    <div class="column">
      <jcSlider title="上内边距："><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.paddingTop" :min="0" :max="750" show-input input-size="mini"></el-slider></jcSlider>
      <jcSlider title="下内边距："><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.paddingBottom" :min="0" :max="750" show-input input-size="mini"></el-slider></jcSlider>
      <jcSlider title="左内边距："><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.paddingLeft" :min="0" :max="750" show-input input-size="mini"></el-slider></jcSlider>
      <jcSlider title="右内边距："><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.paddingRight" :min="0" :max="750" show-input input-size="mini"></el-slider></jcSlider>
      <jcSlider title="富文本宽：" :titleWidth="80"><el-slider slot="slider" v-model="nodeModel.configDict.itemStyle.width"
        :min="10" :max="750" show-input input-size="mini"></el-slider></jcSlider>
    </div>
    <div style="padding: 20px;">
      <Editor v-model="nodeModel.configDict.componentStyle.richtext" :height="500" />
    </div>
    
  </div>
</template>

<script>
import jcSlider from '@/views/interface/composing/components/jc-slider'
import Editor from '@/components/Editor';
export default {
  components: {
    jcSlider,
    Editor
  },
  props:{
      nodeModel:{
          type: Object,
          default: res=>{}
      }
  },
  data() {
    return {

    }
  },
  methods:{
      selectRoute(item){
          this.$emit('selectRoute', item)
      },
      selectTemplate(){
          this.$emit('selectTemplate')
      },
  }
}
</script>

<style lang="scss" scoped>
   @import './commonStyle.scss';
</style>